const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[{
      headImg: "",
      nickName: "测试",
      phone: "13566667777",
      createDate: "19/07/15",
      integralNum: "0",
      levelName: "否",
      yueNum: "0"
    }]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    wx.getStorage({
      key: 'openid',
      success: function(res) {
        let openid = res.data

        wx.request({
          url: app.globalData.URL + '/app/team/myTeams?openid='+openid,
          success: function (res) {
            that.setData({
              list: res.data.list
            })
          }
        })
      },
    })
    
  },
  purchase:function(e){
    var id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: '../purchase/purchase?id=' + id,
    })
  },
  makePhone:function(e){
    
    wx.makePhoneCall({
      phoneNumber: e.currentTarget.dataset.phone,
    })
  }
 
  

 
})